package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import service.Result;
import service.TokenManageService;

/**
 * @program: SSM201759225309
 * @description:
 * @author: Xiaozhuoer
 * @create: 2021-05-15 19:18
 **/

@Controller
@RequestMapping("token")
public class TokenController {

    private final TokenManageService tokenManageService;
    public TokenController(TokenManageService tokenManageService){
        this.tokenManageService = tokenManageService;
    }

    @RequestMapping("/success")
    @ResponseBody
    public Result success(String uuid){
        Result result = new Result();
        if(tokenManageService.CheckToken(uuid)){
            result.setStatus(0);
            result.setMsg("UUID存在");
            result.setData(null);
        }
        return result;
    }
}
